package org.academic.texteditor.gui.tool;

import org.academic.texteditor.gui.feature.Page;
import org.academic.texteditor.gui.feature.PageBorder;

public class BorderDecoration implements Decoration {
	
	private static final long serialVersionUID = 3138218364914428736L;
	
	private PageBorder border;
	
	@Override
	public void decore(Page page) {
		border = new PageBorder();
		border.setBounds(page.getMargin().getRectangle(page));
		
		page.add(border);
	}

	@Override
	public void undecore(Page page) {
		page.remove(border);
	}

}
